package cn.gjculture.shopping.api.dao;

import cn.gjculture.shopping.api.entity.Discount;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DiscountDao {
    @Select("select * from discount where activityId=#{activityId}")
    List<Discount> queryByActivityId(String activityId);

    @Select("select discountId from discount where activityId=#{activityId}")
    List<String> queryIdsByActivity(String activityId);

    @Delete("delete from discount where activityId=#{activityId}")
    int deleteByActivityId(String activityId);
}
